package com.eas.biz.service.exam.domain;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

import org.apache.commons.lang.StringUtils;

public class ExamQuestionDetail {

    private ExamSubjectDetail subjectDetail;

    private String questionNumber;

    private String questionType;

    private boolean isObjective;

    private String answer;

    private Float score;

    private String primaryTag;

    private List<String> tags;

    public ExamQuestionDetail() {
        tags = new LinkedList<String>();
    }

    public void addTags(String tags) {
        if (StringUtils.isNotBlank(tags)) {
            this.tags.addAll(Arrays.asList(StringUtils.split(tags, ",")));
        }
    }

    public ExamSubjectDetail getSubjectDetail() {
        return subjectDetail;
    }

    public void setSubjectDetail(ExamSubjectDetail subjectDetail) {
        this.subjectDetail = subjectDetail;
    }

    public String getQuestionNumber() {
        return questionNumber;
    }

    public void setQuestionNumber(String questionNumber) {
        this.questionNumber = questionNumber;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Float getScore() {
        return score;
    }

    public void setScore(Float score) {
        this.score = score;
    }

    public String getPrimaryTag() {
        return primaryTag;
    }

    public void setPrimaryTag(String primaryTag) {
        this.primaryTag = primaryTag;
    }

    public List<String> getTags() {
        return tags;
    }

    public void setTags(List<String> tags) {
        this.tags = tags;
    }

    public boolean isObjective() {
        return isObjective;
    }

    public void setObjective(boolean isObjective) {
        this.isObjective = isObjective;
    }
}
